home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
vb022e
/
vb022ex.frm
< prev
next >
Wrap
Text File
|
1995-09-06
|
5KB
|
166 lines
VERSION 2.00
Begin Form VB021EX
Caption = "VISUAL BASICS #22 - Custom Message Box"
ClientHeight = 2580
ClientLeft = 1560
ClientTop = 1800
ClientWidth = 7035
Height = 2985
Left = 1500
LinkMode = 1 'Source
LinkTopic = "Form2"
ScaleHeight = 2580
ScaleWidth = 7035
Top = 1455
Width = 7155
Begin CommandButton Command4
Caption = "Quit"
Height = 375
Left = 3540
TabIndex = 10
Top = 1860
Width = 1455
End
Begin CommandButton Command3
Caption = "Show Message"
Height = 375
Left = 1740
TabIndex = 6
Top = 1860
Width = 1455
End
Begin CommandButton Command2
Caption = ">>"
Height = 315
Left = 1200
TabIndex = 4
Top = 1680
Width = 375
End
Begin CommandButton Command1
Caption = "<<"
Height = 315
Left = 840
TabIndex = 3
Top = 1680
Width = 375
End
Begin CheckBox Check1
Caption = "Modal with OK Button"
Height = 255
Left = 1980
TabIndex = 5
Top = 1380
Value = 1 'Checked
Width = 2295
End
Begin PictureBox Picture1
Height = 555
Left = 900
ScaleHeight = 525
ScaleWidth = 525
TabIndex = 7
Top = 1080
Width = 555
End
Begin TextBox Text2
Height = 315
Left = 3840
TabIndex = 9
Text = "4000"
Top = 1020
Width = 1095
End
Begin TextBox Text1
Height = 795
Left = 1620
MultiLine = -1 'True
TabIndex = 1
Text = "Now is the time for all good men to come to the aid of their party. Now is the time for all good men to come to the aid of their party. Now is the time for all good men to come to the aid of their party. "
Top = 120
Width = 4935
End
Begin Label Label2
Alignment = 2 'Center
Caption = " Icon:"
Height = 195
Left = 300
TabIndex = 2
Top = 1260
Width = 555
End
Begin Label Label3
Caption = "Message Box Width:"
Height = 195
Left = 1980
TabIndex = 8
Top = 1080
Width = 1815
End
Begin Label Label1
Alignment = 1 'Right Justify
Caption = "Message Text:"
Height = 435
Left = 420
TabIndex = 0
Top = 120
Width = 1035
End
End
Dim IconNumber As Integer
Sub Command1_Click ()
If IconNumber = 0 Then Exit Sub
On Error Resume Next
IconNumber = IconNumber - 1
Picture1.Picture = MsgForm.PicIcon(IconNumber).Picture
If Err Then
Do
Err = 0
IconNumber = IconNumber - 1
Picture1.Picture = MsgForm.PicIcon(IconNumber).Picture
If Err = 0 Or IconNumber > 64 Then Exit Sub
Loop
End If
On Error GoTo 0
End Sub
Sub Command2_Click ()
If IconNumber = 64 Then Exit Sub
On Error Resume Next
IconNumber = IconNumber + 1
Picture1.Picture = MsgForm.PicIcon(IconNumber).Picture
If Err Then
Do
Err = 0
IconNumber = IconNumber + 1
Picture1.Picture = MsgForm.PicIcon(IconNumber).Picture
If Err = 0 Or IconNumber >= 64 Then Exit Sub
Loop
End If
On Error GoTo 0
End Sub
Sub Command3_Click ()
Msg$ = Text1.Text
Titl$ = "Test Message"
If Check1.Value = 1 Then OKBtn% = MODAL Else OKBtn% = MODELESS
CustomMsg Msg$, IconNumber, Titl$, Val(Text2.Text), OKBtn%
End Sub
Sub Command4_Click ()
End
End Sub
Sub Form_Load ()
IconNumber = 1
Picture1.Picture = MsgForm.PicIcon(IconNumber).Picture
WindowState = 0
End Sub
Sub Form_Unload (Cancel As Integer)
End
End Sub